//
//  BBTodayProfitdetailViewController.m
//  BearSiX
//
//  Created by 潘宇 on 16/3/29.
//  Copyright © 2016年 Tom. All rights reserved.
//

#import "BBTodayProfitdetailViewController.h"

@interface BBTodayProfitdetailViewController ()<UITableViewDataSource,UITableViewDelegate>
{
    NSArray *_dataArr;
    NSArray *_dataArr2;
    NSArray *_dataArr3;
}
@property(nonatomic,strong)UITableView *tableView;
@end

@implementation BBTodayProfitdetailViewController
-(UITableView *)tableView{
    
    if (!_tableView) {
        _tableView =[[UITableView alloc]initWithFrame:CGRectMake(0, 0, WINSIZEWIDTH, WINSIZEHEIGHT)];
        _tableView.delegate = self;
        _tableView.dataSource = self;
        //_tableView.userInteractionEnabled=NO;
    }
    
    return _tableView;
}
- (void)viewDidLoad {
    [super viewDidLoad];
    //UITableView *icontbv=[[UITableView alloc]initWithFrame:CGRectMake(0, 64, WINSIZEWIDTH, 100)];
    
    [self.view addSubview:self.tableView];
    UIView *headView=[[UIView alloc] initWithFrame:CGRectMake(0, 0, WINSIZEWIDTH, 60)];
    _tableView.tableHeaderView =headView;
    UILabel *headlabel=[[UILabel alloc]initWithFrame:CGRectMake(50, 15, 300, 30)];
    headlabel.text=@"北京施华洛婚纱摄影广渠门店";
    headView.backgroundColor=[UIColor colorWithHexString:@"f5f3fc"];
    [headView addSubview:headlabel];
    _dataArr = @[@[@"现金",@"刷卡",@"银行卡",@"VIP卡",@"银行转账",@"网络支付",@"信用卡",@"支付宝",@"微信支付"]];
    _dataArr2 = @[@[@"￥288,880.00",@"￥100,880.00",@"88,880.00",@"9,880.00",@"7,880.00",@"6,880.00",@"880.00",@"480.00",@"10.00"]];
    _dataArr3 = @[@[@"17-1",@"17-2",@"17-3",@"17-4",@"17-5",@"17-6",@"17-7",@"17-8",@"17-8"]];
    UIImageView *icon=[[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 50, 50)];
    [icon setImage:[UIImage imageNamed:@"image12"]];
    // Do any additional setup after loading the view.
}
-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
    
    return _dataArr.count;
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    
    return  ((NSArray *)_dataArr[section]).count;
}
-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
    return 1;
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    UITableViewCell *cell = [[UITableViewCell alloc]initWithStyle:(UITableViewCellStyleValue1) reuseIdentifier:nil];
    cell.textLabel.text = _dataArr[indexPath.section][indexPath.row];
    cell.detailTextLabel.text= _dataArr2[indexPath.section][indexPath.row];
    cell.detailTextLabel.textColor=[UIColor redColor];
     cell.imageView.image= [UIImage imageNamed:_dataArr3[indexPath.section][indexPath.row]];
    
    
   
    return cell;
    
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
   
    return 60;
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    
    [tableView deselectRowAtIndexPath:indexPath animated:YES];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
 #pragma mark - Navigation
 
 // In a storyboard-based application, you will often want to do a little preparation before navigation
 - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
 // Get the new view controller using [segue destinationViewController].
 // Pass the selected object to the new view controller.
 }
 */

@end
